feat: add file path tooltips with centralized PathTooltip component #9030
+113
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
Closes: #8278
Description
This PR adds tooltips to display full file paths on truncated filenames in file editing/reading notices throughout the chat interface.
Implementation details:
PathTooltipcomponent that wrapsStandardTooltipwith appropriate stylingmaxWidth="min(300px,100vw)"via inline style to reliably override defaults[text-wrap:wrap]class to override text-balance behaviorformatPathTooltiphelper for consistent path content formattingCodeAccordian.tsx,ChatRow.tsx, andBatchFilePermission.tsxto usePathTooltipKey design choices:
max-w-[300px]inTooltipContent[text-wrap:wrap]arbitrary property to reliably override the defaulttext-balanceCSSTesting:
Test Procedure
Manual testing steps:
Test truncated paths show tooltips:
src/components/chat/file/with/deeply/nested/structure.tsx)Test all tooltip locations:
Pre-Submission Checklist
Screenshot
Supersedes PR #8797.
Important
Introduces
PathTooltipcomponent to centralize and standardize file path tooltips across the application, reducing code duplication and ensuring consistent behavior.PathTooltipinPathTooltip.tsxfor displaying full file paths.PathTooltipinBatchFilePermission.tsx,ChatRow.tsx, andCodeAccordian.tsx.formatPathTooltipinformatPathTooltip.tsfor consistent path formatting.This description was created by
for fcb9dbe. You can customize this summary. It will automatically update as commits are pushed.